<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>login</title>
</head>
<body>
    <div>
        <form action="/WebDemo/LoginServlet" method="post">
            <h1>请登录</h1>
            <p>UserName:<input id="username" name="username" type="text"></p>
            <p>PassWord:<input id="password" name="password" type="password"></p>
            <div>
                <input type="submit" value="登录">
                <input type="button" value="注册" onclick="forRegister()">
                <input type="reset" class="button" value="重置">&nbsp;&nbsp;&nbsp;
            </div>
        </form>
    </div>
    <script type="text/javascript">
        /**
         * 实现注册页面的跳转
         */
        function forRegister() {
            //花了10分钟
            window.location = "/WebDemo/register.html";
        }
    </script>
</body>
</html>